package org.zero.concurrency.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zero.concurrency.demo.example.threadlocal.RequestHolder;

/**
 * @program: concurrency-demo
 * @description:
 * @author: 01
 * @create: 2018-10-13 22:38
 **/

@Slf4j
@RestController
public class TestController {

    @GetMapping("/test")
    public String test() {
        return "test";
    }

    @GetMapping("/threadLocal")
    public Long threadLocal(){
        return RequestHolder.getId();
    }
}
